Troubleshooting API test case failure


If your API test cases are failing, there can be many possible reasons. This guide lists some common errors that occur while processing API requests and their causes. For more information on API testing using Testsigma, refer to API testing.

Issue Reason How to debug
Connectivity If Testsigma fails to send your request, you may be experiencing connectivity issues. Check your connection by attempting to open a page in your web browser. Wait a few seconds and try the operation again. If the problem persists, contact your network administrator for assistance.
Invalid request URLs Common reasons include:
  • The specified URL Path value doesn't start with/in the definition of the REST API.
  • The opening and closing curly braces ({and}) don't match the URL of the REST API
  • In the URL of the REST API, there are curly braces ('{' and '}') without the parameter name inside.
  • You have an invalid URL set in the URL Path property of a method from a REST API.
  • Replace the space in the URL with %20 in the Rest API tests.
  • You used reserved characters like ;,?,#,$,*,@,{,} or = in the URL Path property.
Review syntax of the URL path.
Invalid HTTP method error You are trying to change the place where the input parameter is sent, from URL to Body, and this is incompatible with the HTTP Method of the REST API Method, which is set to GET. Either change the (method name) method or remove the input parameter.
JSON Path not found Generally, a syntax error in the JSON file syntax. Review syntax of the JSON path. For more information, refer to syntax of a JSON path.
403 Forbidden Authentication was successful but the authenticated user does not have access to the resource, for example, they don’t have the required roles or permissions. Contact your development team for assistance.
501 Not implemented The server does not support the functionality required to fulfill the request. This is the appropriate response when the server does not recognize the request method and is not capable of supporting it for any resource. You can try a different HTTP method to make the request.